﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaleWorlds.CampaignSystem;

//清空多余的技能点用的,防止技能点溢出
namespace ExampleMod
{
    public class LevelUP : CampaignBehaviorBase
    {
        public override void RegisterEvents()
        {
            //大于40级就清空
            if (Hero.MainHero.Level > 40 )
            {
                CampaignEvents.HeroLevelledUp.AddNonSerializedListener(this, clearFocusPoints);
            }
        }

        //清空专精点和属性点
        private void clearFocusPoints(Hero arg1, bool arg2)
        {
            Hero.MainHero.HeroDeveloper.ClearUnspentPoints();

        }

        //不知道干嘛用的,先放这
        public override void SyncData(IDataStore dataStore)
        {
        }
    }

}
